package designPattern;

public class MyTemplateMethod extends MyTemplate {

    static final boolean myFlag = true;
    static final int myNum = 666;

    public MyTemplateMethod(){
        setFlag(myFlag);
        setNum(myNum);
    }

    @Override
    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    @Override
    public void setNum(int num) {
        this.num = num;
    }

    @Override
    public void println(int num) {
        System.out.println("我的实现我做主~");
        System.out.println("MyTemplateMethod is " + num);
    }

    public static void main(String[] args) {
        new MyTemplateMethod().init();
    }
}
